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 ?
You can try this:
print(" ".join([item1, item2]))
The default for print, however, is to put a space between arguments, so you could also do:
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
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
Already have an account? Sign in.