Exception handling in Python

The art and Tao of Python Programming: an introduction to Python language Link to the video course "the art and Tao of Python Programming: an introduction to Python language": https://edu.csdn.net/course/detail/27845 exception handling Errors detected during execution are called exceptions. Exceptions are events that can modify the ...

Posted by anhedonia on Sun, 20 Feb 2022 10:33:26 +0100

Modules and packages for basic Python learning

In Python, in order to write easy to maintain code, we will split the code into different files, so that the code contained in each file will be relatively reduced. In Python, a The py file is called a Module. Benefits of code modularity: (1) Simplified problem solving Reduce the code complexity and split the code into different files. Each ...

Posted by jstgermain on Sun, 20 Feb 2022 08:30:36 +0100

day5 logs and jobs

day5 log Keywords: while, continue, break System functions: Method: ternary operator ternary operator grammar Value 1 if Expression 1 else Value 2 Value 1 if expression else Value 2 (python) == expression? Value 1:Value 2 (2) #Example: if a is greater than 0, the result is 0, otherwise it is 1. a = 100 result = 0 if a > 0 else 1 p ...

Posted by whit3fir3 on Sun, 20 Feb 2022 04:41:25 +0100

argparse: Python command line parameter passing

The gods are silent - personal CSDN blog directory VX "polarisrising war" can directly search and add author friend discussions. argparse module (Python official document: argparse - command line options, parameters, and subcommand Parser - Python 3.10.2 documentation ), which can be used to pass parameters directly when running Pyt ...

Posted by davestewart on Sun, 20 Feb 2022 03:58:39 +0100

python Alipay two-dimensional code payment source code

python Alipay payment WeChat and Alipay SDK Download Click me to download 1. Sandbox environment configuration Offered by Alipay sandbox environment In the development, use your Alipay account to apply for a sandbox account. Can refer to Sandbox instructions Get AppID and so on, then download the Android version of Alipay wallet accordi ...

Posted by porto88 on Sun, 20 Feb 2022 03:17:38 +0100

Alibaba cloud Tianchi financial risk control Task3 - Feature Engineering

Game Title: zero basis entry data mining - loan default of zero basis entry financial risk control Competition address: https://tianchi.aliyun.com/competition/entrance/531830/introduction Purpose: 1. Learn feature preprocessing, missing value, outlier processing, data bucket sorting and other feature processing methods 2. Corresponding methods ...

Posted by exec1 on Sat, 19 Feb 2022 22:49:28 +0100

Python implementation file downloader

Python - implement file downloader Supplementary knowledge points tcp servers generally need to be bound, otherwise the client cannot find the servertcp clients are generally not bound, because they send out the linked server, so as long as the ip, port and other information of the server is determined, the local client can be randomly connec ...

Posted by ccl on Sat, 19 Feb 2022 20:53:41 +0100

Summary of interview questions

1, Foundation 1. Language related issues Q: what are the characteristics and advantages of python? Features: python is an interpretive language. The code is interpreted and executed through the interpreter. The code that is executed is interpreted. There is no need to precompile to generate executable files. Disadvantages of interpretive la ...

Posted by Zepo. on Sat, 19 Feb 2022 19:54:19 +0100

[introduction to Python] Chapter 56 loop advanced while... else statement

Chapter 18 This paper introduces the while loop statement in Python. This article discusses the else branch option of the while statement. while else statement The while statement in Python supports an optional else branch. The syntax is as follows: while condition: # code block to run else: # else clause code block In the above sy ...

Posted by darcuss on Sat, 19 Feb 2022 19:49:24 +0100

Crawl the "active player information" of "NBA30 teams" and store it in three different databases!

My father really loves basketball. He basically pursues it every season. I'm different. I haven't seen much basketball since I graduated from high school. Therefore, I have a feeling, whether I can crawl some information of active players to see if I still have a few acquaintances. 1. Page analysis The page I crawled is Tencent sports, and t ...

Posted by XeRoZeN on Sat, 19 Feb 2022 18:40:24 +0100