Skip to content

Instantly share code, notes, and snippets.

@fabregasguo
Created April 17, 2014 01:28

Revisions

  1. fabregasguo created this gist Apr 17, 2014.
    6 changes: 6 additions & 0 deletions sample.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #include <stdio.h>

    int main()
    {
    return 1;
    }
    13 changes: 13 additions & 0 deletions sample.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    import sys

    def main():
    in_file = open("samle", "r")
    while 1:
    lines = in_file.readlines(10000)
    if not lines:
    break
    for line in lines:
    line = line.strip()
    words = line.split()
    len_word = len(words)
    print len_word