English

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(' ')) - Computer Science (Python)

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

Solution

['WZ-1, New', 'Ganga', 'Nagar,New', 'Delhi']

shaalaa.com
Built-in String Functions
  Is there an error in this question or solution?
Chapter 8: Strings - Exercise [Page 188]

APPEARS IN

NCERT Computer Science [English] Class 11
Chapter 8 Strings
Exercise | Q 2. vii. | Page 188
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×