Calling/selecting variables (float valued) with user input in Python

馋奶兔 提交于 2019-12-02 03:13:43

Once you have calculated the different arrays, you could add them to a dict that maps names to arrays. This can then be used to look up the correct arrays for display_x and display_y:

named_arrays = {
  "X": array_X,
  "Y": array_Y,
  "E": array_E,
  ...
}

return (named_arrays[display_x], named_arrays[display_y])
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!