FANDOM


Strings are a sequence of characters. They represent such a sequence and because they're no primitive data-type, they allow some operations on them, such as Slicing (splitting up Strings).

Strings are very important, because they are the basic data-type for reading and writing data to files, the console and everything else.

The fact that they are a non-primitive data-type implicates that their actual values lie in the Heap, and there's only a reference to them in the runtime-stack.

Syntax Edit

To create a string, just place your text between two quotation marks or two apostrophes.

string1 = "Hello world!"
string2 = 'Hello world!'

Casting Edit

To convert something to a string, type:

str(your_input)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.