This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [7]: t1 = mytime.Time(2013, 1, 1, 12) | |
In [8]: t1.date.ctime() | |
Out[8]: 'Tue Jan 1 12:00:00 2013' | |
In [9]: t2 = mytime.Time(2013, 1, 1, 1) | |
In [10]: t2.date.ctime() | |
Out[10]: 'Tue Jan 1 01:00:00 2013' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import irclib | |
irclib.DEBUG = True | |
import time | |
import re | |
import search | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [13]: a = raw_input("Name ") | |
Name Steven | |
In [14]: a | |
Out[14]: 'Steven' | |
In [15]: type(a) | |
Out[15]: str | |
In [16]: a = raw_input("Number ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func main() { | |
fmt.Println("The value of Pi is %1.3f", math.Pi) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
//import "strconv" | |
var known = map[int] int{0:0, 1:1} | |
func fibo(n int) (result int) { | |
if value, ok := known[n]; ok { | |
result := value |
NewerOlder