zoukankan      html  css  js  c++  java
  • hausaufgabe--python 19- Functions 2

    000-- define a function to check if a string is a symmatrical string

    running result:

    referred :

    how to reverse a string: 

    http://www.jb51.net/article/15700.htm

    001--  define a function to count the passed parameters's amount of letters, digits, spaces, and other symbols 

    count('I love DuoKai.reedy', 'I love you because who I am while I with you. wish we are the best1314.!@#$')

    running result:

    002-- functions in python 

    in python, all the functions have something for return even there is no 'return' request in the code. the type for the non return function is 'None'

    004-- you can return almost all the types for the functions .  By default, you need to put them in the tupple with ' , ' to separate them. 

    005-- Do not use too much global values when it's not mandatory 

  • 相关阅读:
    网页源码爬取
    Vue模板语法上集
    SSH整合
    P1290 欧几里德的游戏
    P1582 倒水
    P2158 [SDOI2008]仪仗队
    P1338 末日的传说
    P1372 又是毕业季I
    P1865 A % B Problem
    P1031 均分纸牌
  • 原文地址:https://www.cnblogs.com/Shareishappy/p/7041648.html
Copyright © 2011-2022 走看看