Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- tuple_from_list = tuple([1, 2, 3, 4, 5])
- print(tuple_from_list)
- print(type(tuple_from_list))
- tuple2_from_list = tuple(list(range(1, 20, 2)))
- print(tuple2_from_list)
- print(type(tuple2_from_list))
- consts = list((0, 1, 1.41, 1.73, 2.23, 2.71, 3.14))
- tuple_of_consts = tuple(consts)
- print(tuple_of_consts)
- print(type(tuple_of_consts))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement