December 2016
Beginner
197 pages
4h 18m
English
© Sanjib Sinha 2017
Sanjib Sinha, Beginning Ethical Hacking with Python, 10.1007/978-1-4842-2541-7_16
Sanjib Sinha1
(1)Howrah, West Bengal, India
In Python a string is an object. As an instance of “class string” it can call any function or property. We can change a string into upper case by simply calling a function upper().
Let us open our terminal and type this:
<code>hagudu@hagudu-H81M-S1:∼$ python3Python 3.4.0 (default, Jun 19 2015, 14:20:21)[GCC 4.8.2] on linuxType "help", "copyright", "credits" or "license" for more information.>>> 'this is a string''this is a string'>>> s = 'this is a string'>>> s'this is a string'>>> s.upper()'THIS IS A STRING'>>> s = 'this is a string now we are going to add an integer into it ...
Read now
Unlock full access