1.
Get two strings through a single line
str1,str2=map(str, input("Enter the two strings separated by a str1,str2=map(str,
space = ").split(" ")) input("Enter the two
print("String-1 = ",str1,"\nString-2 = ",str2) strings separated by a
space = ").split(" "))
print("String-1 =
",str1,"\nString-2 =
",str2)
2. Reverse a string
str1="Orange" The reversed string =
print("The reversed string = ",''.join(reversed(str1))) egnarO
str1="Orange"
print("The reversed string = ",str1[::-1])
str1="Orange"
rev = ""
for ch in str1:
rev = ch + rev
print("The reversed string = ",rev)
str1="Orange"
rev = ""
rev = ''.join([str1[i] for i in range(len(str1) - 1, -1, -1)])
print("The reversed string = ",rev)
3. Concatenate str2 with str1
4.
5.