Select Page

ABIOLA RASP – Raspberries for African School Projects

Wie können wir helfen?

< Alle Themen
Print

Python – String variables

no-159 au-04

String literals

In the programming language phyton it is also possible to write code with letters. This allows us to process a large amount of data. This form is called a string. To define strings in phyton there is a special decleration. The following line show the decleration.

str_var = “Hello i am a string variable

The variable str_var is assigned a string value “Hello i am a string variable”. A string assignment for the variable str_var is made by the double quotation marks. See above. The programme recognises that str_var is a data type of string.

  1. To define strings in phyton, you have to define them specially.
  2. With the print function is it possible to print the content or the value of str_var.
  3. Here you can see the content of the variable str_var

Inhaltsverzeichnis