def show_chars(n): list=['A','B','C','D','E','F','G','H','I','J'] for data, pos in zip(list, range(n)): yield data chars_set= show_chars(5) for ch in chars_set: print ch
A B C D E
def show_chars(n): list=['A','B','C','D','E','F','G','H','I','J'] for data, pos in zip(list, range(n)): yield data chars_set= show_chars(5) for ch in chars_set: print ch
A B C D E
0 comments:
Post a Comment