InterviewSolution
Saved Bookmarks
| 1. |
Consider the following string myAddress: myAddress = "WZ-1,New Ganga Nagar,New Delhi"What will be the output of following string operations : print(myAddress.lower()) print(myAddress.upper()) print(myAddress.count('New')) print(myAddress.find('New')) print(myAddress.rfind('New')) print(myAddress.split(',')) print(myAddress.split(' ')) print(myAddress.replace('New','Old')) print(myAddress.partition(',')) print(myAddress.index('Agra')) |
|
Answer» Consider the following string myAddress: myAddress = "WZ-1,New Ganga Nagar,New Delhi" What will be the output of following string operations :
|
|