
Ваша оценкаЦитаты
ska3o4nik25 декабря 2020 г.Python will do the date arithmetic to figure out that 1,000 days after February 27, 2015, will be November 23, 2017. This is useful because when you calculate 1,000 days from a given date, you have to remember how many days are in each month and factor in leap years and other tricky details. The datetime module handles all of this for you.
053
ska3o4nik25 декабря 2020 г.The pprint.pformat() function produces a string that itself is formatted as valid Python code. By outputting it to a text file named census2010.py, you’ve generated a Python program from your Python program! This may seem complicated, but the advantage is that you can now import census2010.py just like any other Python module.
040
ska3o4nik25 декабря 2020 г.res = requests.get('http://google.com/search?q=' + ' '.join(sys.argv[1:]))
017
ska3o4nik25 декабря 2020 г.Here’s what ICT should really teach kids: how to do regular expressions.
017
ska3o4nik25 декабря 2020 г.Keep this behavior in mind: Forgetting that Python handles list and dictionary variables this way can lead to confusing bugs.
014
ska3o4nik25 декабря 2020 г.The code changed only the cheese list, but it seems that both the cheese and spam lists have changed.
011
ska3o4nik28 мая 2019 г.Programming is more than memorizing syntax and a list of function names. As when learning a foreign language, the more practice you put into it, the more you will get out of it.
049
ska3o4nik28 мая 2019 г.With GUI automation, your programs can do anything that a human user sitting at the computer can do, except spill coffee on the keyboard.
043
ska3o4nik28 мая 2019 г.If you do not want this exception to crash your program, add try and except statements to your code.
034