Here is a straightforward and simple code block. I'd prefer to test every element in the list just to check whether it contains an Alpha Numeric character for additional processing.
#!/usr/bin/python
words = ["cyberpunk" ,"x10", "hacker" , "x15" , "animegirl" , "x20"]
for x in words:
print x + " / " + str(x.isalnum())
This gives the below output:
cyberpunk / True
x10 / True
hacker / True
x15 / True
animegirl / True
x20 / True
If I test is as below:
x = "x10"
print x.isalnum()
x = "this sucks"
print x.isalnum()
This is the result which I get:
True
False
I just want to know, what is the difference between standalone strings and the list strings