0

Does space count as a position?

str = "Hello world!" print(str[5])

18th Feb 2018, 9:50 AM
Yash Mohta
Yash Mohta - avatar
3 Answers
+ 2
Yes, space is a character it has its own ascii code and "str = "Hello world!" print(str[5])" will print a space
18th Feb 2018, 9:56 AM
magicalKhachapuri
magicalKhachapuri - avatar
18th Feb 2018, 9:57 AM
Yash Mohta
Yash Mohta - avatar