str的常用方法有: str.digits 0-9的表示str.uppercase 大写字母str.lowercase 小写字母str.letters 所有字母" ".join(str) “”内必须有值,才可以用joinstr.encode() str.replace(x,y) 将str中的x替换为 ...
分类:
编程语言 时间:
2017-11-29 22:02:43
阅读次数:
204
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This ...
分类:
其他好文 时间:
2017-11-29 21:59:49
阅读次数:
120
You are given a string s consisting of lowercase Latin letters. Character c is called k dominant iff each substring of s with length at least k contai ...
分类:
其他好文 时间:
2017-11-26 20:33:39
阅读次数:
173
Assume s is a string of lower case characters. Write a program that prints the longest substring of s in which the letters occur in alphabetical order ...
分类:
编程语言 时间:
2017-11-24 22:47:36
阅读次数:
176
版本控制 name = raw_input('what is your name: ') if 's' in name: print 'your name contains the letters "s" ' else: print "your name does not contain 's' " ...
分类:
其他好文 时间:
2017-11-19 11:17:05
阅读次数:
164
A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determine t ...
分类:
其他好文 时间:
2017-11-13 13:51:57
阅读次数:
126
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Examp ...
分类:
其他好文 时间:
2017-11-13 11:37:16
阅读次数:
145
题目描述 A message containing letters fromA-Zis being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded mes ...
分类:
其他好文 时间:
2017-11-12 17:25:54
阅读次数:
140
Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho ...
分类:
其他好文 时间:
2017-11-10 18:42:03
阅读次数:
135
题目链接:http://codeforces.com/problemset/problem/888/C 题目: You are given a string s consisting of lowercase Latin letters. Character c is called k-domina ...
分类:
其他好文 时间:
2017-11-10 15:18:14
阅读次数:
312