0

None type

Is none a string or is it a unique type? In the lesson it is given to be an empty string But when I tried to add it to another string it gave an error

1st Feb 2020, 6:14 AM
Sanjai Prabakarraj
Sanjai Prabakarraj - avatar
2 Respostas
+ 2
It's not a string or any other common data type. None (or NULL) is a special datatype referring to the fact that a variable is not set, or unset. Note that this is different from the number value 0 and also different from saving strings like "none" or "null", or even an empty string. it's also not the same as false, although comparing null/none to anything except null/none will always return false, so languages usually have other means of checking whether a value is set.
1st Feb 2020, 6:44 AM
grdr
+ 1
Perfect👍.... trying such things is what the lessons are for. Also use the comment part there for questions like this.
1st Feb 2020, 6:41 AM
Oma Falk
Oma Falk - avatar