Advertisements
Advertisements
Question
Consider the following string myAddress:
myAddress = "WZ-1, New Ganga Nagar, New Delhi"
What will be the output of the following string operation:
print(myAddress.split(' '))
One Line Answer
Advertisements
Solution
['WZ-1, New', 'Ganga', 'Nagar,New', 'Delhi']
shaalaa.com
String Method and Built-in Functions in Python
Is there an error in this question or solution?
Chapter 8: Strings - Exercise [Page 188]
