Hi
Is it possible to print (or search) a single char in a string ?
I've try a lot of things, like this for example for third char :
my_string = "pixilang"
print ( my_string[2] , 0 , 0 , WHITE, TOP|LEFT )
but I can't...
I can only print ascii code after num to string conversion...
print (or search) a single char in a string
- NightRadio
- Site Admin
- Posts: 3955
- Joined: Fri Jan 23, 2004 12:28 am
- Location: Ekaterinburg. Russia
- Contact:
Re: print (or search) a single char in a string
print can understand only the containers.
So here is the code :)
So here is the code :)
Code: Select all
my_string = "pixilang"
ts = " "
ts[ 0 ] = my_string[ 2 ]
print ( ts, 0 , 0 , WHITE, TOP|LEFT )
Re: print (or search) a single char in a string
It works !
Many thanks
Many thanks