string concatenation, string deletion
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> fruit1="apple"
>>> fruit2="orange"
>>> del fruit 1
SyntaxError: invalid syntax
>>> del fruit1
>>> fruit1
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
fruit1
NameError: name 'fruit1' is not defined
>>> fruit2
'orange'
>>> word1="My"
>>> word2="name"
>>> word3="is"
>>> word4="Aamir"
>>> word1+word2+word3+word4
'MynameisAamir'
>>> word1+" "word2
SyntaxError: invalid syntax
>>> word1
'My'
>>>
=
>>> word1+" " word2
SyntaxError: invalid syntax
>>> word1+" "+word2
'My name'
>>>
Comments
Post a Comment