數據的應運
四則運算:先算括號裏的在乘除加減
字符串的拼接:+
數據類型的查詢——type()函數html
who = '個人' action = '是' destination = '鏡像世界' number = 153 code = 3.32 print(type(who)) print(type(action)) print(type(destination)) print(type(number)) print(type(code))
結果:
bash:124$ python ~/classroom/apps-1-id-5cd9765619bbcf0001554798/124/main.py
<class 'str'>
<class 'str'>
<class 'str'>
<class 'int'>
<class 'float'>python
做用:能夠驗證數據類型瀏覽器
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鳥教程(runoob.com)</title> </head> <body> <div id="result"></div> <script> // 檢測瀏覽器支持 if (typeof(Storage) !== "undefined") { // 存儲 sessionStorage.setItem("lastname", "Smith"); // 檢索 document.getElementById("result").innerHTML = sessionStorage.getItem("lastname"); } else { document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage..."; } </script> </body> </html>
能夠在Application中的sessionStorage查看bash
*注意:使用的時候儘可能弄清楚循環的次數和相關數據儘可能不要把數據弄錯session