Python Programming Langauge


In the followiing example string value is assigned to a variable and the type is tested. You may observe that variable is not created with the type of the data it can hold but the value is assigned to the variable without declaring it

Two strings are concatenated with simple '+' symbol and the resultant string is displayed

Even the length of the resultant string is found out and it is displayed

Note: You can run the programs using program files instead of running the programs in the interactive mode which is shown in the following example

Different operations are performed on string and few are listed and the example is shown below

  • Conversion of strings from Lower to Upper case and vice versa
  • Formatting the output of the string
  • Converting string to integer and vice versa
  • Accessing Substring of a string; may be single character or group of characters etc.


Progams<< Previous

Next >> Lists & Examples

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus












Footer1