function

Published by onesixx on

help(print)

Help on built-in function print in module builtins:

print(...)
    print(value, ..., sep=' ', end='\
', file=sys.stdout, flush=False)
    
    Prints the values to a stream, or to sys.stdout by default.
    Optional keyword arguments:
    file:  a file-like object (stream); defaults to the current sys.stdout.
    sep:   string inserted between values, default a space.
    end:   string appended after the last value, default a newline.
    flush: whether to forcibly flush the stream.

함수내용보기

print( getsource( functionA ))

from mmdet.apis import show_result_pyplot

import inspect
inspect.getsource(show_result_pyplot)

#import dis
#dis.dis(show_result_pyplot)
import inspect
src = inspect.getsource(show_result_pyplot)

import rich
rich.print(src)

내 함수

def rleid(seq):
    char = "sixx"
    group = 0
    result = []
    for i in range(0, len(seq)):
        if seq[i] == char:
            result.append(group)
        else:
            group = group + 1
            result.append(group)
            char = seq[i]
    return result

Categories: Python Basic

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x