• 2022-06-29
    下面说法正确的是( )。知识点:列表->字符串
    A: time = [23,59,59]print(":".join(time))的输出结果是23:59:59
    B: time = ['23','59','59']print(":".join(time))的输出结果是23:59:59
    C: time = ['23','59','59']t_str = ""for t in time: t_str += t+":"print(t_str)程序输出结果是23:59:59
    D: time = [23,59,59]t_str = ""for i in range(len(time)): if i<len(time)-1: t_str += str(time[i])+":" else: t_str += str(time[i])print(t_str)程序输出结果是23:59:59