Strings
str_single = "Hello"
str_multiline = """Multiline
string"""
print(str_multiline.upper())
Useful string methods:
name = "John Doe"
print(name.lower()) # john doe
print(name.split()) # ['John', 'Doe']
Numbers
integer = 42
floating_point = 3.14
complex_number = 2 + 3j
# Converting between types
float_to_int = int(3.7) # 3
Working with NumPy for advanced number manipulation:
import numpy as np
array = np.array([1, 2, 3])
print(array.mean()) # 2.0