Input loop: Difference between revisions
Content added Content deleted
(Add LIL) |
m (move fileinput to first part of python section since it's the most flexible) |
||
Line 1,921: | Line 1,921: | ||
=={{header|Python}}== |
=={{header|Python}}== |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
To create a Python3 input loop use python's `input()` function. |
To create a Python3 input loop use python's `input()` function. |
||
Line 1,948: | Line 1,954: | ||
lines = my_file.readlines() # returns a list of the rest of the lines from the file</lang> |
lines = my_file.readlines() # returns a list of the rest of the lines from the file</lang> |
||
This does not mix well with the iteration, however. |
This does not mix well with the iteration, however. |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|R}}== |
=={{header|R}}== |