my_string = """This is my first line,
this is my second line, and...
...this is my fourth line!"""
Bunun ilk satırını (This is my first line,
) ayrı bir dizeye nasıl kaydedebilirim? ,Dizenin ilk satırını nasıl okurum?
my_string.split('\n', 1)[0]
erimlilik aşkına:
AttributeError: 'str' object has no attribute 'readline'