35. Python Program to read Characters Continuously until $ is given number of Characters.
How does this program work?
- In this program you will learn about how to read characters continuously until $ is given number of characters using Python.
Here is the code
string = str(input("Enter string: "))
char = 0
for i in string:
char = char+1
if ( i== '$' ):
break;
print("Number of characters entered:")
print(char)