Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
「helloworld」という文字列をリストにして、タプルに変更する必要があります。誰かが助けてくれることを期待して、コードに行き詰まってしまいました。
s1=str("hello world") L1= list(s1) print type (L1) list print L1(5)
s1="hello world" L1=s1.split(" ") t1=tuple(L1) print type(t1) tuple print(t1) ('hello', 'world')
別の方法も見つけたと思います。
s1= str("hello world") L1= list(s1) print type (L1) print L1