Lets say I have a string that consists of x unknown chars. How could I get char nr. 13 or char nr. x-14?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First make sure the required number is a valid index for the string from beginning or end , then you can simply use array subscript notation.
use
len(s)to get string length