LintCode:有效数字
2016-04-28 21:42
218 查看
LintCode:有效数字
人生苦短,我用Python!
人生苦短,我用Python!
class Solution: # @param {string} s the string that represents a number # @return {boolean} whether the string is a valid number def isNumber(self, s): # Write your code here num = None try: num = eval(s) except: pass if num != None: return True return False
相关文章推荐
- 机器学习实战 第九章 源码勘误
- TextKit/富文本/图层混排模式的使用(一)NSAttributedString
- 第十周 学习进度表
- maven 学习---使用Maven模板创建项目
- Codeforces Round #348 (VK Cup 2016 Round 2, Div. 1 Edition) C 离散化+树状数组+map D 数学
- PAT 1008. 数组元素循环右移问题
- bloom filter
- Objective-C与js相互调用及传参数注意
- 接口电平标准
- IOS开发总结之UIButton常用属性和方法
- 软件架构的典型组成部分-资源管理
- 使用kernel编译+busybox定制Linux系统--实现ssh远程登录+web服务的迷你主机
- Angular学习记录-显示与隐藏
- 数据结构与算法(一) 交换
- 《常见算法和数据结构》优先队列(3)——堆排序
- 字符相关算法
- ubuntu 下安装x264库
- For循环语句的使用和函数的调用
- 二叉树的创建及其基础操作
- NOIP200505谁拿了最多的奖学金