\nこのように先頭から削除したい\n id int(10) NOT NULL。、、、してみましstrip()た。理解できません。私は何が間違っているのですか?rstrip()lstrip() replace('\n', '')
print(column)
print(column.__class__)
x = column.rstrip('\n')
print(x)
x = column.lstrip('\n')
print(x)
x = column.strip('\n')
print(x)
print(repr(column))
与える
\n id int(10) NOT NULL
<type 'str'>
\n id int(10) NOT NULL
\n id int(10) NOT NULL
\n id int(10) NOT NULL
\n id int(10) NOT NULL
'\\n `id` int(10) NOT NULL'