数据的应运
四则运算:先算括号里的在乘除加减
字符串的拼接:+
数据类型的查询——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