English

What will be the output of the given python program? str1 = "welcome" str2 = "to school" str3=str1[:2]+str2[len(str2)-2:] print(str3)

Advertisements

Question

What will be the output of the given python program?

str1 = "welcome"
str2 = "to school"
str3=str1[:2]+str2[len(str2)-2:]
print(str3)
Short Answer
Advertisements

Solution

output:

weol

shaalaa.com
Programs Using Strings
  Is there an error in this question or solution?
Chapter 8: Strings and String manipulation - Evaluation [Page 131]
Advertisements
Share
Notifications



      Forgot password?
Use app×