Junior — Middle
Can you give an example of a basic object in Python?
sobes.tech AI
Answer from AI
In Python, any object can be considered a basic object, as everything in Python is an object. For example, an integer int is a basic object:
x = 42
print(type(x)) # <class 'int'>
Another example is the string str:
s = "Hello"
print(type(s)) # <class 'str'>
These objects have methods and properties, and can be worked with directly.