0

What is the meaning of (!)

2nd Dec 2018, 8:01 AM
Arnab Das
Arnab Das - avatar
7 Answers
+ 2
Ah that is no operator but just a sign that is written to the screen! print('Hello!') leads to the output 'Hello!' So whatever you put into quotes, is called a string - it is just a row of letters. And you can combine strings with the + operator: print('Hello ' + 'world!') leads to the output Hello world! Two strings are tied together, that's all it is. You should try it out for yourself in Playground and get a feeling for how it works.
3rd Dec 2018, 10:57 AM
HonFu
HonFu - avatar
+ 2
It means "NOT".
2nd Dec 2018, 8:49 AM
Mustafa K.
Mustafa K. - avatar
+ 1
x is a variable, where the sentence "This is a string" is stored. So in this case writing print(x + '!') is the same as writing print('This is a string' + '!') which is what I talked about above. First, there was a number in x, but then it got overwritten with the string.
3rd Dec 2018, 11:48 AM
HonFu
HonFu - avatar
+ 1
Thanks
3rd Dec 2018, 12:13 PM
Arnab Das
Arnab Das - avatar
0
Deepanjali Das, in what context did you see it in Python?
2nd Dec 2018, 9:13 AM
HonFu
HonFu - avatar
0
In. Basic Concepts> Variables
3rd Dec 2018, 10:29 AM
Arnab Das
Arnab Das - avatar
0
Then how the (!) is used in the following code:- https://code.sololearn.com/cCBSbtAL5yon/?ref=app
3rd Dec 2018, 11:09 AM
Arnab Das
Arnab Das - avatar