import tensorflow as tf
x = tf.constant([[1,2,3],[3,5,6],[3,40,9]])
sess = tf.Session()
print(sess.run(x[0:3]))
print('===================')
print(sess.run(x[0:2]))
print('===================')
print(sess.run(x[..., 0:2]))
=============================================
[[ 1 2 3]
[ 3 5 6]
[ 3 40 9]]
===================
[[1 2 3]
[3 5 6]]
===================
[[ 1 2]
[ 3 5]
[ 3 40]]