Title says it all really, I just need to find out how to find the location of a space in a string.
Asked
Active
Viewed 77 times
1 Answers
0
Strings have a .find
method which you can use to find the first instance of a character:
x = "this contains a space"
print(x.find(" "))

Ian Moote
- 851
- 8
- 15