Tag:Boolean value

  • Lesson 3 of initial Python


    Reference source: Vitu.AI Today, let’s look at the use of Boolean. Boolean types in Python are represented by two constants, true and false. x = True print(x) print(type(x)) Unlike the example above, which assigns true to x, we usually don’t put true and false directly in the code, but get the Boolean value through some […]

  • Casts and implicit conversions of data types


    Classification of data types Classification of data types:Basic data typeandReference data type Coercive transformation Coercion mainly refers to the use of some specific functions to manually convert various types of values to their corresponding types. Number() UseNumber()Function, you can convert any type of value to a numeric value. There will be different results depending on […]

  • Arrangement of knowledge points encountered in February 2020


    *Note: This article is to sort out the knowledge points contacted in the process of work. The price comparison between the things involved is disorderly. If there is any mistake, you are welcome to correct and guide 1: Iframe session lost 2: The part of Vue exceeding the number is displayed with Ellipsis 1. Use […]

  • 8 minutes to understand the iterator and generator in ES6


    Iteration? As the name suggests, update iterations. In JSIteration means that we repeat the process of fetching data from a piece of code, and execute the process of fetching data from time to timeIt’s different from traversal,Traversal emphasizes to enumerate all data and operate one by one。 Iterator? Iterator is our encapsulation of iterative process, […]

  • Self test Python process control basic skills with Aunt Liu, 35


    0. Sudden confusion Process control statements, Boolean values, and Boolean operators all belong to thepythonThe basic work of. I wrote this note at the weekend, not to sort out these basic knowledge points, but to record a few code segments that suddenly confused me. ——The code itself is very simple, but even if you have […]

  • JavaScript syntax and data types


    JavaScript variables     Summary     Put a specific value into the variable. Then this variable represents our specific value. If we want to use this value again, we don’t need to recalculate or do other operations. We can directly use variables to get the previously stored value. Simply put, a variable is a […]

  • Various date operations in the front end [worth collecting]


    Preface Although there are mature and easy-to-use libraries for processing date, such as (momentum JS and date FNS), in actual development, we may not need the whole library sometimes.So I sorted out all kinds of operations on date and time in front-end development, which is quite complete. Part of it comes from ourselves, and part […]

  • Automatic login of python3 + selenium test mailbox


    Test Tencent email automatic login Install selenium class Install chrome driver Positioning the elements of Tencent’s enterprise mailbox Download chromedriver.exe http://npm.taobao.org/mirrors… # -*- coding:utf8 -*- from selenium import webdriver import time from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC driver_path = ‘C:\\Users\\silence_sean\\AppData\\Local\\Google\\Chrome\\Application\\chromedriver.exe’ driver = webdriver.Chrome(executable_path=driver_path) driver.get(‘https://exmail.qq.com/login’) driver.find_element_by_class_name(‘js_show_pwd_panel’).click() driver.find_element_by_id(‘inputuin’).send_keys(‘xxxxx.com’) driver.find_element_by_id(‘pp’).send_keys(‘xxxxx’) driver.find_element_by_id(‘btlogin’).click() Right click “check” […]

  • Python basic string


    Python basic variables mainly include character type and numerical type. Compared with numerical type data, character type data can be understood as a kind of text, which is more widely used in the field of language. Python’s string data type is unchangeable, so when creating a variable whose type is string, the character of the […]

  • Django basic command


    Create projectDjango admin startproject project nameCreate applicationDjango admin startapp application name Generation migration python3 manage.py makemigrationExecution transfer python3 manage.py migrate Create background administrator account python3 manage.py createsuperuser Django database General attributeDB column =’name’specifies the name in the databaseDefault = 0 specifies the default valueNull = false non NULL constraint, null can be null when it […]

  • How to write if expression in vs as Boolean value?


    In vs, if statement expression is often used to express the judgment result. If the expression is a Boolean value, how to write it is the norm? Now let’s take a look at the detailed tutorial. Software Name: Visual Studio 2015 Simplified Chinese Official Edition (Enterprise Edition) Software size: 4.5GB Update time: 2016-09-17 1. First, […]

  • Assert assertion sentence of Python 01


    The keyword assert constitutes an assertion sentence, which can be used to help us lock the scope of a bug when we write a new program. Expression: Assert expression’window prompt information’ The items in parentheses are optional items, which will be thrown when the Boolean value of the expression is False, making the error clearer. […]