How to input string in python?
The python strings are characters enclosed in single, double and triple quotes. Python strings are immutable. Strings are sequence of characters, where each character has a unique position id/index.
We can easily take input of string using input() function.
s=input("enter the string-") print(s)
In this way by using input() function we can take the input of the string in python.
Please login to comment
View all comments