We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ff6b75 commit 154ac7cCopy full SHA for 154ac7c
1 file changed
Python.System/Python/print.cs
@@ -52,17 +52,25 @@ public static void print(IEnumerable @object,
52
bool flush = false)
53
{
54
var _file = file ?? Console.Out;
55
- string str = "";
56
- foreach (var item in @object)
+ if (@object is String)
57
58
- str += item.ToString();
59
- str += sep;
+ _file.Write(@object);
+ _file.Write(end);
60
}
+ else
61
+ {
62
+ string str = "";
63
+ foreach (var item in @object)
64
65
+ str += item.ToString();
66
+ str += sep;
67
+ }
68
- str = str.Remove(str.Length - sep.Length, sep.Length);
69
+ str = str.Remove(str.Length - sep.Length, sep.Length);
70
- _file.Write(str);
- _file.Write(end);
71
+ _file.Write(str);
72
73
74
if (flush) _file.Flush();
75
76
#endregion
0 commit comments