Nov-04-2020, 06:02 PM
(Nov-04-2020, 05:52 PM)beginner2020 Wrote: I got the below error, using python version 2.7.5. Will that be due to version.
date_str, _ = line.split(maxsplit=1)
TypeError: split() takes no keyword arguments
I saw it too late.
You should avoid the use of Python 2.7. It's end of life.
Python 3.6 is the oldest available version which has still support.
Python 3.5 has also reached the end of life.
That maxsplit can be a keyword-argument was introduced with Python 3.3.
Start your repl or script with
python3
.Just
python
without a 3 will start the Python 2.7 interpreter on the most distributions.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!