python return 返回多个值,实际返回的是一个tuple:

#!/usr/bin/env python
# -*- coding: utf-8 -*-


def rt():
    return 1, 2

a = rt()

print a # (1, 2)

  

相关文章:

  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-25
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案