write a python program to accept a string first and print in following format as given in the output:
enter the string:student
entered string is : student of std XI
Answers
Write a python program to accept a string first and print in following format as given in the output:
enter the string:student
entered string is : student of std XI.
{:/def change_char(str1):
char = str1[Student]
str1 = str1.replace(student of std XI/:""')
str1 = char + str1[1:]
://Enter the string
< /return str1
output (change_char('str1')(char)/>
enter the string : student
entered string is : student of std XI
__________________________________
Question :-
write a python program to accept a string first and print in following format as given in the output:
enter the string:student
entered string is : student of std XI
Answer :-
(\print("a","b")
a b
print("a","b",sep="")
ab
print(192,168,178,42,sep=".")
192.168.178.42
print("a","b",sep=":-)")
a:-)b
A print call is ended by a newline, as we can see in the following usage:
for i in range(4):
... print(i)
...
0
1.student
2.student of std XI
for i in range(4):
... print(i, end=" ")
...
0 1 2 3
for i in range(4):
... print(i, end=" :-) ")
...
0 :-) 1 :-) 2 :-) 3 :-) h = \>