Home of real teaching & learning
  • Full support for teachers
  • Focus on critical thinking
  • Engaging classroom activities
  • Integrated student eBook
  • Assessed tasks / qBank
  • Practice exam questions

The InThinking Guarantee: Our sites are written by expert practitioners and not by AI

See our AI policy

Disclaimer: InThinking subject sites are neither endorsed by nor connected with the International Baccalaureate Organisation.

Don't miss out, find out!

B 2.1.2 Worksheet Python Answers

Create a variable named text with the value "Hello, world!".Extract the substring "world" using slicing and print it. Create a variable named email with an email address (e.g., "[email protected]").Find the position of the "@" symbol using the find() method and print it. Create a variable named sentence with the value "This is a sentence.".Replace all occurrences of " " with "_" and print the modified sentence.

Help