REPL

>>> type("abc")
<class 'str'>
>>> help(str)

>>>
>>> help(str)

>>> type(1)
<class 'int'>
>>> help(int)

>>> help(int)

>>>
>>> help(str)

>>> help(str)

>>>
 uv run python
Python 3.14.3 (main, Feb  3 2026, 15:32:20) [Clang 17.0.0 (clang-1700.6.3.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> "abc".count("a")
1
>>> "abca".count("a")
2
>>> "abca".count("ab")
1
>>> "abcadabab".count("ab")
3
>>> "aaa".count("a")
3
>>> "aaa".count("aa")
1
>>> "Karthik".endswith("k")
True
>>> "Karthik".endswith("ik")
True
>>> "Karthik".endswith("jk")
False
>>> "Karthik".endswith("hik")
True
>>> "Karthik".upper()
'KARTHIK'
>>> 1.is_integer()
<python-input-11>:1: SyntaxWarning: invalid decimal literal
  File "<python-input-11>", line 1
    1.is_integer()
      ^^^^^^^^^^
SyntaxError: invalid syntax
>>> (1).is_integer()
True
>>> (1.5).is_integer()
False
>>> ("").is_integer()
Traceback (most recent call last):
  File "<python-input-14>", line 1, in <module>
    ("").is_integer()
    ^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'is_integer'
>>> a = 3
>>> a.is_integer()
True
>>> b = 2.5
>>> b.is_integer()
False
>>> "chapter one".title()
'Chapter One'
>>