Python str()

Configurare noua (How To)

Situatie

Metoda str() returnează reprezentarea în șir a unui obiect dat.

Solutie

Pasi de urmat

test1 = str(‘Ceva’)
print(test1)

test2 = str(35)
print(test2)

test3 = str(‘Ceva2’)
print(test3)

Output:

Ceva
35
Ceva2

Tip solutie

Permanent

Voteaza

(2 din 3 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?