+ 7
Python uses 0-based indexing.
print(x[0])
+ 6
This also will do the job:
print(input()[0])
+ 2
Hey hey here counting starts from 0 not 1 đ¤
+ 1
In python indexes start at 0. It should be x[0]
0
the regex here is ^\w where the ^ indicates to look if it happens at the start of the string and then the \w is for any a-z, A-Z, and _
- 1
look into regex. I use regex to do this stuff. something like
import re
x = input(ââ)
y = re.findall(â^\wâ, x)
print(y)