5596/how-print-first-character-each-word-upper-case-string-python
Lets say there is a string such as "this is a sample python program".
How to write a program such that it would print the first character of each word in the string. such as T,I,A,S,P,P
i.e. This Is A Sample Python Program ?
Hey,
You can try this:
Use .join():
print(" ".join([item1, item2]))
The default for print, however, is to put a space between arguments, so you could also do:
print(item1, item2)
I hope this will be helpful.
If you are talking about the length ...READ MORE
following way to find length of string x ...READ MORE
Python strings are immutable, you change them ...READ MORE
Try the below code inputString = input("Enter a ...READ MORE
You can use the endswith method. It checks ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
can you give an example using a ...READ MORE
You can simply the built-in function in ...READ MORE
You can use word.find('o') as well to ...READ MORE
OR
Already have an account? Sign in.