zoukankan      html  css  js  c++  java
  • Python–ToDay(01)python基本数据类型 二进制—>十六进制

    1.Python数据类型

        1>数字

                        1。int 整形   ,long长整型,float 浮点型 ,complex 复数

         2>布尔值    真或假  1 或0

         3> 字符串

                字符串格式化输出   %s 字符串   ; 整数%d  ;浮点数 %f

                字符串常用功能    1:移除空白 2:分割 3:长度  ; 4索引   ;5切片

          4>列表

                创建列表:

                      name_list = [‘alex’, ‘seven’]     或者

                      name_list = list([‘ales’, ‘seven’,'eric’]}

         5>元组

                     不可变列表  创建元组

                    ages =(34,56,45,43,23) 或   ages = tuple((34,34,34,))

          6>字典 无序

    person = {“name”:"mr.wu”,'age':10} 或 person=dict({“name":"mr.wu",'age':18}


    Python入门

       1.三元运算符           result = 值1 if 条件  else 值2

       2. 二进制转16进制   每四进一    1111   -->15

                    16进制  0x 前缀; BH后缀

    bytess  string   转换     ,bytes    decode  转为str     str  encode  转为bytes



        吾之爱,心之念。
               携子手,到白头。

  • 相关阅读:
    《闯关东》群英传
    这老太太
    URL重写与伪静态
    创建索引视图时提示架构绑定无效,名称必须由两部分构成
    马色见
    食神智多星
    Beautiful Code and Beautiful Software
    /wp64 Compiler Option
    C++的x64移植
    Managing the State Data of MFC Modules
  • 原文地址:https://www.cnblogs.com/JC-0527/p/6980185.html
Copyright © 2011-2022 走看看