Stephen1991
asked on
Python
Noob here,
Do you know how I can get (search/find/ ?) the middle character of a string ?
Do you know how I can get (search/find/ ?) the middle character of a string ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you.
It is better to use the // operator, i.e. midChar = s[len(s)//2]. It is the floored quotient also known as integer division.
ASKER