tkinter的插入的典型用法是:
text1.insert(5.5,'*')
我想使用:
for x in 10: text1.insert(5.x,'*')
但是我得到的语法无效。
索引只是line.character形式的字符串,因此可以使用字符串格式:
for x in range(10): text1.insert(f"5.{x}", "*")