简体   繁体   English

处理 Python 的变量

[英]Variables handling Python

I used to code in Matlab in which it's easy to see the saved variables in the workspace window.我曾经在 Matlab 中编写代码,在其中很容易在工作区窗口中查看保存的变量。 So for example a = [1,2,3] can be easily found in the workspace window.例如,可以在工作区窗口中轻松找到 a = [1,2,3]。

Now I started to use python in Pycharm.现在我开始在 Pycharm 中使用 python。 In Python I can create the same variable, a = [1,2,3] but there isn't a window which shows me all the variables already created in the script.在 Python 中,我可以创建相同的变量 a = [1,2,3] 但没有一个窗口显示脚本中已创建的所有变量。 Having only 1 variable isn't a problem but when defining a lot of variables it can be difficult to know which variables are already defined ant what these variables contain.只有 1 个变量不是问题,但是当定义很多变量时,很难知道哪些变量已经定义,以及这些变量包含什么。

My Question:我的问题:

How does one have a good overview of all variables in Python (Pycharm)?如何对 Python (Pycharm) 中的所有变量有一个很好的概述? Is there a similar window like the Workspace window of Matlab in Pycharm? Pycharm中是否有类似Matlab的Workspace窗口的窗口?

You can use the Debug Tool Window to examine the variables stored in your application.您可以使用调试工具窗口来检查应用程序中存储的变量。

More information can be found here: (PyCharm 2016.3) https://www.jetbrains.com/help/pycharm/2016.3/debug-tool-window-variables.html更多信息可以在这里找到:(PyCharm 2016.3) https://www.jetbrains.com/help/pycharm/2016.3/debug-tool-window-variables.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM