5. Python data is intelligent

1text = "anita lava la tina"
2print(text.upper())
3print(text.split())
line that just executed

next line to execute

Print output (drag lower right corner to resize)
Frames
Objects

Activity: CodeLens 5.1 (cl_l33_5a_en)

5.1. find method

  • find method for strings

1text = "Palmeras"
2print(text.find("P"))
3print(text.find("lmer"))
4print(text.find("Pa"))
line that just executed

next line to execute

Print output (drag lower right corner to resize)
Frames
Objects

Activity: CodeLens 5.1.1 (cl_l33_5b_en)

Activity: 5.1.2 ActiveCode (ac_l33_5_en)

You have attempted 1 of 3 activities on this page