Python variable type
I wonder how to know if a variable in Python is a number, list, or string?
|
Code:
>>> a = [5] |
I thought that Python doesn't tell any difference between int and float!?
Also, I wonder how to split a string into a list of words, and how to check if a variable does not equal any one of the contents of a list? |
Quote:
Code:
C:\>python |
Quote:
Code:
mylist="This is a string to split".split() |
and finally, head down to the Python documentation site, (my sig) to learn all about it.
|
Quote:
Code:
>>> someString = "aap noot mies wim zus jet teun" |
All times are GMT -5. The time now is 08:08 PM. |